package array;

public class DynamicAllocation {

	@SuppressWarnings("null")
	public void run(){
		String[] foo = null;
		foo = howBigArray(100);
		int i = 0;
		for(String s : foo){
			System.out.println("String["+ (i++) +"] = " + s);
		}
		String[] bar = null;
		bar[0] = "elem 0";
		System.out.println(bar[0]);
	}
	
	private String[] howBigArray(int i) {
		String[] dynAll = new String[i];
		for(int j = 0; j < i; j++){
			String s = "" + (char)(31+j);
			dynAll[j] = s;
		}
		return dynAll;
	}

	public static void main(String[] args) {
		DynamicAllocation da = new DynamicAllocation();
		da.run();
	}

}
